
include $(ACM_ROOT)/src/common_lib_macro.mk

EMC_FLAGS = -fPIC
LOCAL_CPPFLAGS = \
  $(COMMON_LIB_CPPFLAGS) \
  -I $(ACM_ROOT)/src/kernel/include \
  -I $(ACM_ROOT)/src/time/include \
  -I $(ACM_ROOT)/src/utils/include \
  -I ./include

vpath %.h include

# Alhabetically arranged.
CPP_SRC = \
	cl_logger.cxx  

CPP_OBJS = $(CPP_SRC:.cxx=.o)
LIB = $(LIBDIR)/libcl_logger.so

all: build

build: $(LIB)

$(LIB): $(CPP_OBJS)
	$(CCC) -shared -Wl,-soname,$(@F) -o $@ $^ 
	$(CP) $^ $(OBJDIR)
	$(CP) ./include/*.hxx $(TOP_INCLUDE_DIR)

install:
	$(CP) $(LIB) 

.PHONY: clean
clean : 
	$(RM) $(CPP_OBJS) $(LIB)

ifneq ($(MAKECMDGOALS),clean)
-include $(CPP_SRC:.cxx=.d)
endif
